Skip to content

Fix type equality and inequality parsing#125

Merged
dalance merged 2 commits into
dalance:masterfrom
yousifBilal:type-equality
Jun 10, 2026
Merged

Fix type equality and inequality parsing#125
dalance merged 2 commits into
dalance:masterfrom
yousifBilal:type-equality

Conversation

@yousifBilal

Copy link
Copy Markdown

The parser fails to parse a valid case presented in the 2017 standard in 6.23.

I took this test case from sv-tests:

module top #( parameter type T = type(logic[11:0]) )
   ();
   initial begin
      case (type(T))
        type(logic[11:0]) : ;
        default           : $stop;
      endcase
      if (type(T) == type(logic[12:0])) $stop;
      if (type(T) != type(logic[11:0])) $stop;
      if (type(T) === type(logic[12:0])) $stop;
      if (type(T) !== type(logic[11:0])) $stop;
      $finish;
   end
endmodule

This merge provides a fix for case statements equality / inequality checks.

@dalance

dalance commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Thank you for your contribution!
I'll merge this PR.

@dalance dalance merged commit 48ac02e into dalance:master Jun 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants